/*
 * @Autor: dc
 * @Date: 2022-02-25 11:14:37
 * @LastEditors: dc
 * @LastEditTime: 2022-03-01 14:26:37
 * @Description: 监听项目性能
 */
const reportWebVitals = onPerfEntry => {
  if (onPerfEntry && onPerfEntry instanceof Function) {
    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
      getCLS(onPerfEntry);
      getFID(onPerfEntry);
      getFCP(onPerfEntry);
      getLCP(onPerfEntry);
      getTTFB(onPerfEntry);
    });
  }
};

export default reportWebVitals;
